package com.vhall.component.controller.account.facade.api;

import com.vhall.component.entity.account.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * app端用户登陆
 *
 * @author longzhen.gong
 * @date 2021/6/9 16:43
 */
@FeignClient(value = "ApiCslAuthFacade", path = "/v4/api/account")
public interface ApiCslAuthFacade {

    /**
     * 登录
     *
     * @param authLoginVO 参数
     * @return 返回值
     */
    @PostMapping(value = "/auth/login")
    AuthLoginRspVO login(@Validated AuthLoginVO authLoginVO);

    /**
     * 登出
     *
     * @param authLogoutVO 参数
     */
    @PostMapping(value = "/auth/logout")
    void logout(@Validated AuthLogoutVO authLogoutVO);

    /**
     * 观众端登录,嘉宾助理
     *
     * @param authLoginVO 参数
     * @return 返回值
     */
    @PostMapping("/auth/login-watch")
    AuthLoginRspVO loginWatch(@Validated AuthLoginVO authLoginVO);

    /**
     * 第三方用户登录
     *
     * @param authLoginVO 参数
     * @return 返回值
     */
    @PostMapping("/auth/third-login")
    ThirdAuthLoginRspVO thirdLogin(@Validated ThirdAuthLoginVO authLoginVO);

    /**
     * 游客登录
     *
     * @param authLoginVO 参数
     * @return 返回值
     */
    @PostMapping("/auth/visitor")
    VisitorAuthLoginRspVO visitor(@Validated VisitorAuthLoginVO authLoginVO);

    /**
     * 游客登录 用设备id 进行登录
     *
     * @param authLoginVO 参数
     * @return 返回值
     */
    @PostMapping("/auth/visitor_use_device_id")
    VisitorAuthLoginRspVO visitorUseDeviceId(@Validated VisitorAuthLoginVO authLoginVO);

    /**
     * 获取5个随机未使用过的昵称
     */
    @ApiOperation("获取5个随机未使用过的昵称")
    @PostMapping("/random_nicknames")
    List<NicknamesVO> getRandomNicknames();

    /**
     * 绑定昵称
     */
    @ApiOperation("绑定昵称")
    @PostMapping("/choose-nickname")
    boolean chooseNickname(@Validated ChooseNicknameVO chooseNicknameVO);

    /**
     * 查询账户信息
     *
     * @param vo 参数
     * @return 返回值
     */
    @PostMapping(value = "/set")
    String set(@Validated AccountEditVO vo);

}
